﻿using System;
using PostSharp.Aspects;

namespace BizElements.BusinessLayer.Aspects
{
    /// <summary>
    /// Generates global cache category name used by <see cref="CachedAttribute"/> and <see cref="InvalidatesCacheAttribute"/>.
    /// </summary>
    public interface ICacheCategoryGenerator
    {
        #region Methods.

        /// <summary>
        /// Gets global cache categories for the method's return value.
        /// </summary>
        /// <param name="postsharpEventArgs">Arguments of events bound to an instance (because they relate to a field or to a method, for instance).</param>
        /// <returns>Array of categories assgined to the cache item.</returns>
        string[] GetCategories(AdviceArgs postsharpEventArgs);

        #endregion
    }
}